/* @(#)GSProviderModifyViewAction.java    V0.1
 *
 * Project: GSdevelop
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   owen         2006-2-27
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.bean.GSProviderBean;
import com.hitrust.gs.business.GSProviderProcessor;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.service.GSBaseManager;

/**
 * 
 */
public class GSProviderModifyViewAction extends GSBaseAction{

    public String execute(GSBaseForm aForm) throws Exception {
        String tProviderId = aForm.getRequest().getParameter("ProviderId");
        GSProviderProcessor tGSProvider = new GSProviderProcessor();
        GSProviderBean tGSProviderBean = tGSProvider.getProviderDetail(tProviderId);
        
        aForm.getRequest().setAttribute("providerdetail",tGSProviderBean);
//      取得所有国家
        ArrayList tList = GSBaseManager.getAllCountry();
        aForm.getRequest().setAttribute("country",tList);
        //取得所有省
        tList = GSBaseManager.getAllProvince();
        aForm.getRequest().setAttribute("province",tList);
        //取得所有地区
        tList = GSBaseManager.getAllDistinct();
        aForm.getRequest().setAttribute("district",tList);
        //取得公司性质
        String[][] tStr= GSBaseManager.getAllCorpProperty();
        aForm.getRequest().setAttribute("corpproperty",tStr);
        
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
